package com.epam.facebook_client.task;

import java.io.IOException;
import java.util.Map;

import org.apache.http.client.ClientProtocolException;

import android.content.Context;
import android.view.View;

import com.epam.facebook_client.manager.HttpClientManager;

public abstract class PostStringAsyncTask extends CommonPostAsyncTask {


	public PostStringAsyncTask(Context context, View view) {
		super(context, view);
	}

	public PostStringAsyncTask(Context context) {
		super(context);
	}

	@Override
	public String post(String url) throws ClientProtocolException, IOException {
		return HttpClientManager.get(context).postString(url, params());
	}

	public abstract void success(String result);

	public abstract Map<String, String> params();

	public abstract void onError(Exception e);

}
